package com.flot.yazb.model;

import com.flot.yazb.base.model.CModel;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by fengdongfei on 2017/9/4.
 */

public class CityModel extends CModel {

    public List<ProvinceModel> province;

    public static class ProvinceModel {
        /**
         * area_id : 1
         * area_name : 北京
         * area_parent_id : 0
         */

        public String area_id;
        public String area_name;
        public String area_parent_id;
    }

    /**
     * 获取结果里面的id
     * @return
     */
    public List<String> getStringList() {
        List<String> arrs = new ArrayList<String>();
        for (ProvinceModel pm : province) {
            arrs.add(pm.area_name);
        }
        return arrs;
    }

    /**
     * 获取结果的id集合
     * @return
     */
    public List<String> getIdList() {
        List<String> arrs = new ArrayList<String>();
        for (ProvinceModel pm : province) {
            arrs.add(pm.area_id);
        }
        return arrs;
    }
}
